.language-selector {
  position: relative;
  display: inline-block;
  z-index: 1000;
}

.language-selector-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.95) 100%);
  border: 2px solid rgba(24, 144, 255, 0.6);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  min-width: 100px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 16px rgba(24, 144, 255, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.language-selector-trigger:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(230, 247, 255, 1) 100%);
  border-color: rgba(24, 144, 255, 0.8);
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.language-selector-trigger.active {
  background: linear-gradient(135deg, rgba(230, 247, 255, 1) 0%, rgba(184, 233, 255, 0.95) 100%);
  border-color: #1890ff;
  box-shadow: 0 8px 20px rgba(24, 144, 255, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

.language-flag {
  font-size: 18px;
  line-height: 1;
}

.language-name {
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.language-arrow {
  font-size: 12px;
  color: #1890ff;
  font-weight: bold;
  transition: transform 0.3s ease;
  margin-left: auto;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.language-arrow.rotated {
  transform: rotate(180deg);
}

.language-selector-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 150px;
  animation: dropdownFadeIn 0.2s ease;
  backdrop-filter: blur(10px);
  z-index: 1001;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.language-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.language-option:last-child {
  border-bottom: none;
}

.language-option:hover {
  background-color: rgba(24, 144, 255, 0.05);
}

.language-option.active {
  background-color: rgba(24, 144, 255, 0.1);
  color: #1890ff;
}

.language-option .language-flag {
  font-size: 16px;
}

.language-label {
  flex: 1;
  font-weight: 500;
}

.language-check {
  color: #1890ff;
  font-weight: bold;
  font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .language-selector-trigger {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 80px;
  }
  
  .language-flag {
    font-size: 16px;
  }
  
  .language-selector-dropdown {
    min-width: 120px;
  }
  
  .language-option {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
  .language-selector-trigger {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  
  .language-selector-trigger:hover {
    background: rgba(30, 30, 30, 1);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .language-selector-trigger.active {
    background: rgba(30, 30, 30, 1);
    border-color: #1890ff;
  }
  
  .language-name {
    color: #fff;
  }
  
  .language-arrow {
    color: #ccc;
  }
  
  .language-selector-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .language-option {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.05);
  }
  
  .language-option:hover {
    background-color: rgba(24, 144, 255, 0.1);
  }
  
  .language-option.active {
    background-color: rgba(24, 144, 255, 0.2);
  }
}

/* 登录页面专用样式 */
.login-language-selector {
  position: absolute;
  top: 20px;
  right: 20px;
}

.login-language-selector .language-selector-trigger {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.login-language-selector .language-selector-trigger:hover {
  background: rgba(255, 255, 255, 0.95);
}

/* 小尺寸变体 */
.language-selector.compact .language-selector-trigger {
  padding: 6px 8px;
  font-size: 12px;
  min-width: 70px;
}

.language-selector.compact .language-flag {
  font-size: 14px;
}

.language-selector.compact .language-name {
  display: none;
}

.language-selector.compact .language-selector-dropdown {
  min-width: 120px;
} 